import request from '@/utils/request'

export function listJobDispatch(query){
  return request({
    url: '/base/jobDispatch/list',
    method: 'get',
    params: query
  })
}

export function updateJobDispatch(data){
  return request({
    url: "/base/jobDispatch",
    method: "put",
    data: data,
  });
}

// 开始测试
export function startTest(data){
  return request({
    url: '/base/jobDispatch/startTest',
    method: 'post',
    data: data
  })
}


// 获取设备任务列表（通道列表）
export function listByDevice(deviceNo) {
  return request({
    url: "/base/jobDispatch/listByDevice/" + deviceNo,
    method: "get",
  });
}


// 批量设置任务cron值 , 设置周期
export function setCron(data) {
  return request({
    url: "/base/jobDispatch/setCron",
    method: "put",
    data: data,
  });
}
